Cassette OperafingSysfem CDS FOR ALL ATARI COMPUTER SYSTEMS 5Y5TEMS Eassellt QperalingSyslem CDS BY: George J. Pol ly (C) Copyright 1983 An ALPHA SYSTEMS Product Alpha Systems presents: COS The Cassette Operating System TABLE OF CONTENTS INTRODUCTION 2 LOADING 4 PACKAGE OVERVIEW 4 COS OPTION MENU 6 A INFORMATION 6 B QUICK BACKUP OF CASSETTE 7 C DISASSEMBLER 8 D SAVE CASSETTE 9 E LOAD CASSETTE 9 F BINARY FILE TO CASSETTE 10 G BACKUP CASSETTE TO DISK 11 H MULT I SECTION FILE TO DISK 11 I BACKUP ON DISK TO CASSETTE 12 J DISK DIRECTORY 13 K DISPLAY MEMORY LOCATIONS 13 L LOAD FILE 14 M SAVE FILE 1* QUICK BACKUP 14 THE PROGRAM RECORDER 15 LOADING PR0BLEM5 16 MUSIC WHILE LOADING i7 THE LOADER PROGRAM 18 HOW TO MAKE YOUR TAPE 18 ATARI is a trademark of ATARI, Inc. INTRODUCTION The Cassette Operating System was designed to use the Atari Program Recorder to its fullest potential. The COS and manual takes you step by step through the many options it offers. Everything a cassette user ever needs to do is contained in the COS. Including quick and easy backup of cassette programs. All in this one package !!! For the professional programmer COS offers you a quick and easy way to add "CLASS" to your programs. It also allows you to look at other professional programs and learn from their examples. It offers a easy way to change a disk file to an auto boot cassette. For the amateur user COS allow you to backup 99.9% of com m ercial programs on cassette. No more accidentally erased com m ercial cassettes gone forever. COS backups these programs with no modification to the computer or Program Recorder. The COS puts 90S> of all com m ercial cassettes to diskette. The COS can do what it says. However, some manufactures try to protect their products from being copied. Some cassettes check if the disk drive is on. Some diskette files use the disk to load additional information. The COS can copy all cassettes which are compatible on both the original and XL series computers. Guarding any secret protection method, it can put most binary disk files to cassette and most cassette files to disk. COS is intended only to backup programs from those companies who do not offer backup copies of their programs. Alpha Systems offers backup copies if your first is destroyed (see warranty at any manual). The COS is not intended for the illegal duplication of copyrighted materials. Alpha systems does not promote software piracy. Piracy tends to raise the price of software and discourage software co m ;.r:nies. So PLEASE respect copyright laws. The only reason to copy a program is to make a backup copy for yourself, so your 30 dollar program w ili not be lost tor e v e r • I A 01 N V, To load the CDS, first, turn on the Disk Drive, the T . V. /Monitor and any other peripherals. Insert the COS diskette, front side up, into disk drive number one. I urn on the Atari computer, the introduction screen will lonii and be displayed first. The introduction screen will be white and the title will appear on it. A short menu will appear at the bottom of the screen asking which part oT the CDS package should be loaded. It can be either the COS or the Quick Backup. Select one of these by pressing the first letter of the appropriate program ( it appears in inverse video ). After selecting the program, it will begin auto m atically . PACKAGE OVERVIEW The COS and Quick Backup are designed to lie simple and easy to use while flexible at the same time. Whether you are a first time computer user or a professional, read this manual carefully. If you do not understand any part or concept, do not become discouraged. Refer to other sources lor help. Other "option" instructions could help because they are similar. There are also many magazines which have excellent articles on the Atari Program Recorder and its function. Because program was designed to operate similar to Atari's DOS, you should be familiar with its operation. When using the COS be careful on the size of the cassette file which you are going to load. The COS will error if the file is too large, usually an error 9. The COS will handle up to 20,000 bytes which is sufficient for most cassette programs. If it is too large and you only want to copy it, use the Quick Backup Program for 4BK cassette. If you wanted to modify a large program using the COS and it is more than one section, try loading just one section at a time. If you plan to use the COS to copy a large number of programs, use the Quick Backup. If you plan to use the COS to modify a number of programs, press the •RESET' key and reload after you are through with each cassette file. Before you start there are some terms which you must know for this manual. A section is a group of 128 byte blocks of data. Each section has a beginning leader and an end. At the beginning of each section the computer will beep once if it is going to load a section and twice if it is going to save it. A cassette file is one to nine sections which are loaded continuously or one section by itself. To find the number of sections in a cassette file, Usten to it load. The number of sections will be the number of times the computer beeps (a very short tone emitted from under the keyboard on the 400's and 800's, emitted as a low tone from the TV speaker on the XL series). The beeps will be followed by a brief period of silence. A disk file is a ordinary disk file as explained in the DOS manual. A filename is the name given to a disk file. To enter a disk filename, enter the device, filename, and extention, then press the 'RETURN' key in the following format (refer to your DOS manual for more information). FORMAT: D n:filena m e.ext EXAMPLE: D1:G A M E.B AS To properly position a tape for a save, you will have to advance the tape past the leader until the tape itself (brown) can be seen. Otherwise, a long leader may not end before the computer begins to save. Any questions which the COS will ask are to be answered and then followed by pressing the 'RETURN' key. In m ost cases pressing 'RETURN' without entering anything else wili abort the option and return to the option screen. IT you encounter an error, the computer will beep twice" and the current operation will be aborted. Some com m on errors and their causes follow. If its not listed refer to an Atari Manual. ERROR 138 : cassette not connected or 'PLAY' and •RECORD' not pressed 170 : filename wrong or not on the disk 143 : cassette is bad (won't load) 144 : bad sector or write protector is on 140 : cassette is bad (won't load) COS OPTION MENU When the COS loads, the option menu will be displayed. It is red and lists the options. Below the menu is a prompt asking for a selection from the option m enu. The m enu can be display again by pressing the 'RETURN' key. Pressing any other key will begin the corresponding option. A. INFORMATION This option gives information on the file which is currently loaded into the COS. This information will aid in the disassembly of the file. The advanced programmer can use this table to modify a files size, sections or contents. Once the 'A' key has been pressed, the COS will ask whether to print the table or not. Pressing the *Y' key and then 'RETURN' will print the table on a standard printer. Any other response will cause the table to be printed onto the screen. The table will display the number of sections and amount of free memory left. It will display the length, start, and end of each section and all the sections combine in both decimal and hexadecimal . After the table is printed, the COS will ask whether you wish to modify the table or not. For example, the COS can be used to load a file from cassette and modify the information table so the COS will save only part of the original file. It can also combine two sections into one. The possiblities are endless. Table 1 lists those things which you can change. To modify press the 'Y' key and then 'RETURN'. Any other response will return to the option menu prompt. If you choose to modify, the COS will prompt you to the changes which can be made. The original values will be displayed. If you choose not to modify press the 'RETURN' key and the original values will stay the same. TABLE 1 OBJECT VALUE SECTIONS 1-9 START OF FILE 17800 - 30000 LENGHT OF FILE 1 - 30000 B. QUICK BACKUP OF CASSETTE Ihe quick backup option allows you to load a cassette file and then save it immediately. Use the save file option to make any additional copies of the cassette file. After pressing the 'B' key, enter the number of sections in the file to be backed-up. Now, press 'PLAY' on the Program Recorder and the 'SPACE' bar to begin. Wien the file is finished loading, insert a blank cassette into the Program Recorder, this time, press 'PLAY' and 'RECORD', and press the 'SPACE' bar. Ihe x COS will make a backup copy of the original file. Mien finished it will display the option menu. C. DISASSEMBtER The COS disassembler can be used to change a file into assembler code which can be saved, printed or modified. Ihe saved version is compatible with the Atari Assembler Editor and other assemblers. The disassembly is in the standard 6502 assembly code. The first column is the memory location in decimal. The second column is the memory location in hexadecimal. The third column is the 6502 mnemonic and addresses. The final column is the ASCII code of the object code. If you chose either the printer or the screen, you will also receive the data in hexadecimal between the second and third columns. If this assembly is used with a assembler, the memory location in decimal becomes the line number and the memory location in hexadecimal becomes the label. If you choose the printer the final column will not be printed. After pressing the 'C key, the destination menu will app>ear. It will ask which device to send the assembly to. Press an appropriate letter for a device, or press the 'RETURN' key to return to the option menu. After pressing the appropriate letter, three prompts will appear which are answered by typing either a decimal number or a hexadecimal number proceeded by a dollar sign, then press the 8 'RETURN' key. For example, the location 512 may be entered by typing '512' and 'RETURN', or '$0200' and 'RETURN'. The first prompt will ask for the address of the starting location of the disassembly ( this can be obtained from the information table ). If you chose anything but the screen as a output device, enter the ending address, which is the point at which the disassembler will stop. The final prompt will ask for the imaginary starting location. This is the location which the assembly should be in but is not. For example, if the file you are disassembling is stored by the COS at location 17000, but it normally loads at 5000. Enter 17000 as the real address, and 5000 as the imaginary address. The imaginary address should be used to simulate a computer load. If in doubt make this location the same as the real starting location. The real location will appear on the same line as the imaginary prompt, just press 'RETURN' to choose it. When finished with the final prompt, the COS will begin to disassemble. Once the COS is disassmebling, it may be paused by pressing 'CONTROL' and ' 1 ' simultaneously. To return to the destination menu and stop dissassembly , press the 'RETURN' key. To change the imaginary address when disassembling, press the 'A' key and enter the imaginary address (when using the same imaginary as real you may enter the real address here). For example, if a line of code reads 'BNE 409A' , to continue disassembly at location $409A press 'A' and enter '$409A*. If the restart disassembly address is at a constant location such as $E456 the COS will not disassemble at the proper location, unless the imaginary address is the same as the real address. To disassemble at $E456, return to the destination menu, and use $E456 as the real and imaginary address. As a general rule, if the address is with a branch command it will work; if it is with a jump command be careful. D. SAVE CASSETTE This option is used to save a file which has been previously loaded into the COS. Once the 'D' key has been pressed, insert a properly positioned blank cassette. The COS will beep twice to signal when a save will take place. Press 'PLAY' and 'RECORD', and then press the 'SPACE' bar to begin saving. Ihe file will he saved to cassette. E. LOAD CASSEITE This option is used to load a file from cassette into the COS. Once it is in the memory, modify it, examine it, or save it using the save cassette option. First, enter the number of sections and press the 'REIURN' key. Next, position the cassette at the beginning of the file to the beginning, then enter the number of sections the file contains. The COS will beep once to signal when a load will take place. Press 'PLAY' and 'RECORD'. Press the 'SPACE' bar to begin. When it is finished loading, the COS will return to the option menu. E. BINARY LOAD PILE TO CASSETTE This option can be used to take any binary disk file and save it to cassette using a special COS binary loader program. Ihe cassette file may be loaded like any other machine language file. The binary loader program is loaded from disk, so do not remove the disk from the drive until the COS prompts you to do so. After pressing the 'E' key, enter the filename of the disk file to be put on cassette. Do this by typing: the device, filename, extension and then press the 'RETURN' key. For example, ' Dl: SMASH. 0B0' would take SMASH. OBJ from disk drive #1. Keep the COS diskette in the disk drive. When the COS asks you to insert the COS diskette with binary loader on it, press the 'SPACE' bar. When the COS asks you to insert the source diskette with the file you want to to put to cassette, press the 'SPACE' bar to load it. Wien the file is loaded the computer will beep twice for save. Press 'PLAY' and 'RECORD' on your Program Recorder. Press the 'SPACE' bar to begin the save. Ihe COS will automatically save the file and display the option screen. To load this file from cassette, press the 'START' key ('START' and 'OPTION' on XL's) while turning on the computer. Position your cassette and press 'PLAY' on the Program Recorder. After the computer beeps, press the 'RETURN' key to load. For those of you using the COS as a development tool, the binary loader program can be modified to display the title of the program which it will load. This can be accomplished by making one copy using option 'F' then use option 'K' to modify the binary loader (it will be in memory). Next, save the cassette file. G. BACKUP CASSETTE TO DISK This option is used to backup a cassette program from the COS memory onto a diskette. The program will be only a data file which will not run. However, they are much safer on a diskette. First, enter the filename which will become the data file for the cassette. To begin the save, press the 'SPACE' bar. The program will then be backed up to diskette. It can be loaded from disk and saved to cassette using load backed-up cassette option CI'). H. MULTI SECTION FILE TO DISK This option is used to save a cassette file to diskette. V*ien entering this option, all of the other options and anything in the COS memory will be lost. To go back to the COS, reload the COS diskette. 11 Af-ter pressing the 'H' key, place the COS diskette into the disk drive. Press the 'SPACE' bar. Any cassette file in the memory will be lost. Ihis option begins with the COS prompting you to enter the number of sections. Insert the cassette and press the 'SPACE' bar to load. Mien the cassette has loaded insert a disk into drive one. Ihe COS will ask whether the program is BASIC or not. Answer using r Y' or 'N' and then pressing 'RETURN'. If it is BASIC, you will be asked if it is self boot or not. A self hoot cassette is loaded by holding down the 'START' key while turning on the computer. Otherwise its not a self boot. Mien finished with the options, press the 'SPACE' bar to write the program on the disk. Vvhen it is finished, press 'RETURN' to do another cassette. Press 'A' to make another copy. If at any time an error occurs the COS will give an error message and return to the number of sectors prompt. lo load a disk created with COS simply insert the disk into the drive and turn on the computer ( if it is BASIC use the BASIC cartridge). If it is a BASIC program and does not self boot, turn on the computer with BASIC inserted. V*ien the 'READY' propnit appears, follow the instructions given with the program. I. BACKUP ON DISK TO CASSETTE A cassette file which has been saved as a data file to diskette (using the back-up cassette option 'G'), can be loaded from a disk file, then saved back to cassette using the Save Cassette option. The cassete file will be identical to the origianal cassette file. Enter the filename of the disk data file on diskette. Next, insert the diskette containing the file and press the 'RETURN' key. Use the Save Cassette option to put it to cassettte. J. DISK DIRECTORY 12 Ibis option allows the user to list all of the files on a diskette, and the number of sectors each uses. When the COS prompts for a drive number, press the number of the drive to be listed, then press the 'RETURN' key. To use drive number one, just press the 'RETURN' key. K. DISPLAY MEMORY LOCATIONS This option may be used to display data from any memory location in hexadecimal and Atari ASCII codes. Any memory locations can then be modified to suit your needs. After pressing the '1^,' key, the COS will prompt for a beginning, loaction to be displayed. This can be entered in hexadecimal or decimal. The next 128 bytes from this location will be displayed. The first number to be displayed is the memory location in hexadecimal. The next eight numbers are what the locations contain in hexadecimal. The final column is the same memory location in Atari Internal Code. < : display back 128 bytes > : display next 128 bytes : move cursor up : move cursor down : move cursor left : move cursor right SPACE : modify byte under cusor RETURN : exit option When the data is finished being displayed, a cursor will appear on the first byte of the display. This will be your pointer. Use the following list of commands to modify a byte or 13 exit the mode. When changing a byte, enter the byte in hexadecimal or decimal. When finished, the cursor will return to the byte modified on the screen. Pressing the 'RETURN' key will exit this mode and return you to the option menu. t. LOAD FILE This option is used to load a disk file to form the lost section of a cassette file. The information table can then be used to switch it with any section you wish. The Cos will prompt for the filename of the disk file to load. Enter the filename and press the 'RETURN' key. Insert the correct diskette, and press the 'SPACE' bar to load. M. SAVE TILE This option is used to save a section of a cassette file to a disk file. The information table can be used to modify the beginning and end of a cassette section, then use this option to save it to a disk file. A prompt will appear asking which section is to be saved. Enter a number, between 1 and the number of sections in the cassette file currently loaded. Press the 'RETURN' key to abort. After entering, insert the correct diskette and press the 'SPACE' bar to save. QUICK BACKUP I he (}uick [Backup is designed to copy a cassette program up to nine sections and 40K. The status line on the screen will ask for the number of sections use the option key to choose. Press the 'OPTION' key to increase it by one. After it reaches nine, the letter 'A' will be displayed. This letter will let you make a second copy of the program which was loaded before. After the 'A', the number of sections will return to one. To start the copying process, press the 'START' key. After the computer beeps once, press the 'SPACE' bar, and it will load the program. Mien loaded, the computer will beep twice. Insert a blank cassette and press 'RETURN' to save. To make another copy, use 'A' as the number of sections. If at any time an error is encountered, the status line will turn red. Press 'SYSTEM RESET' to start over. THE ATARI PROGRAM RECORDER The Atari Program Recorder is actually a regular stereo tape recorder with minor added features. A stereo recorder is different from a regular recorder because it has to separate tracks which store information. These tracks are defined as left and right (see figure 1) . The left track is called the audio track. It stores audio such as voice or music. This audio is played through the speaker in your TV or monitor. Normally it is blank. The right track is called the digital track. It stores information in digital form such as a program or information which a program uses. Only the Atari computer can understand this seemingly noise. It, too, is played through the audio speaker of your TV/monitor. The information on the digital track is made up of only two different sounds. One is the space and the other is the mark (they are 3995 Hz and 5327 Hz respectively). These marks and spaces make up the information which the computer uses. They represent bits. Ten bits make one byte. This may seem strange, but the first and 15 CO CD ' — ' O CO 3= —. o m 1x3 1= c: o o O 1 — I o I — I 3= cr o 70 3= o 7; 70 7; o 7^ TO 3= o 7^: 3= n 7^ 70 CD 3= o 7*: CD ~n 3C — I -H — 1 — 1 70 TO 3= 3= O <n 7"^ 7^ last bit are not used, [hey are a space for start and a mark tor stop. These bits are on the tape at 6LXJ baud or 600 bits for every second. Ihese bits are stored on the tape in groups. Each group contains 132 bytes of data. The first two bytes are markers for speed (the Atari can adjust for speed). Then a control byte, 128 data bytes and a checksum. The control byte can tell if the record is full, half full or the end of a section. The checksum is all the bytes added together to show if the recorder has read correct. LOADING PROBLEMS A common problem with the Atari Program Recorder is its inability to load and save with 100% accuracy. This is mainly because it is not a high quality product and its user does not use high quality tape. If your recorder is not loadino tapes made on the recorder itself, the problem is most likely the problem of the quality of the tapes you use. The best tape for your Atari is a high quality audio or digital tape of a short lenght. A discount type tends to lose information. A long tape tends to be too thin. We recommand 5 to 15 minute digital tapes or 30 minute Maxwell or TDK. If your recorder is not loading tapes made on a different recorder, the problem is most likely tape alignment. This is caused by the two tape heads reading and writing at two different locations. However, this can be fixed by turning the head adjust screw. But be aware, the tapes you have made previously on your recorder may not load. The proper way to load a tape from another recorder would be: to adjust your tape head, to load the tape, and turn the it back to the original position when saving. An alternative to tape head adjusting is to bring the two recorders to the same computer. Load it into the COS with one and save it back onto the other recorder. Adjusting the tape head is not difficult, but it can be moved off alot if you adjust it too much. Try it at your own risk. To find the screw, press 'PLAY' with the cover open. It is the screw 16 on the left of the read/write head. You can turn it with a small Phillips screwdriver. Make sure you mark the original position of the screw and number of turns moved, in case you want to put it back. To adjust put a the tape in under the cover (not in!) press •PLAY'. While in BASIC, POKE 54018,52 to turn on the recorder motor. Turn your TV/monitor volume until the computer sounds like its loading. Now turn the screw a small amount at a time until the sound is loudest. And that's it, it's adjusted. MUSIC WHILE LOADING Are you tired of hearing buzzes in your sleep after a long day of computing? Do you reach for the the volume control when you load a program? Or do you just want to add touch of class to your program? If you said yes to any of these questions then read on!!! In this section of the manual we will tell you how to make a cassette that will play your favorite music or anything you want while your program is loading. Before we explain how to do it we will explain how it works. The Atari Program Recorder was designed to be able to play music while a program is loading. The audio track which normally is empty is where your music will go. If you already had a tape set up with the program on the digital track and your music on the audio track, when you loaded it, you would notice a problem. The music and the buzzes would come through the TV or monitor speaker at the same time. It would still load but it would not sound good. There is a way to stop this. If you POKE a into memory location 65 the computer will stop any sounds which come from the digital track. You could POKE 65,0 before you load your program in the immediate mode or create a loader program which does it for you. THE LOADER PROGRAM This loader program we have made will do several things. First 17 it will put on the screen LOADING. . .PLEASE WAIT so you have something to look at while the program is loading. You can change this to what ever you wish. Second, it will POKE a into location 65 which shuts off excess noise. third, it will continue to load your program. When it is finished it will run it automatically! (HOW 10 MAKE YOUR TAPE The method we are going to describe is not the only way to make your tape, but we believe it is the best. The only extra things you will need are : an audio cassette recorder, masking tape, cassettes and your favorite music. First, take your program and save a backup copy on a cassette (not the cassette that will have the music on it). Next type in the loader program. CSAVE the loader program on the tape which the music will be on BEFORE Y00 RUN IT!!! When the loader program is run the computer will attempt to load and clear the memory. After you save the program, do not rewind the cassette but advance it a couple inches. To put music on the cassette use an audio cassette recorder. The music should be about as long as it takes the program to load. If the music is longer than your program you might want to fade it out when appropriate. Now we come to the tough part. Normally when saving a program on the Program Recorder, it erases both tracks of the cassette before recording. To record your program on the the digital track and leave the audio track alone you must place a small piece of masking tape on to the erase head (see figure 2). It will be easier to put the tape on the head if the 'PLAY' button is pressed. DO NOT PUT THE TAPE OVER THE TAPE GUIDE which is the pronged piece on the side of the tape head. Take the program which has the loader program and music on it. Rewind the tape and load the loader program. Once this done type NEW to clear the memory. Do not rewind the tape but take it out and set it aside. Next load your program and save it on the tape you set aside. You have just finished. 18 Before you check the cassette you should take off the masking tape and clean the erase head with a cotton swab and alcohol. Now you are ready to load your tape. Rewind the tape and type CtOAD "to load the first part. Wien READY appears type RUN and press the 'RETURN' key. Sit back and enjoy!!! t 1 S T I NG 1 10 GRAPHICS 7-16 20 POS I T ION 0,5 30 ? #6;" LOADING..." 40 ? #6;" please wait" 50 FOR 1 = 1536 TO 1554:READ A:P0KE I,A:NEXT 1 60 POKE 65,0 70 POKE 764,12 80 I -USR( 1 536 ) 90 DATA 162,253,154,169,18 3,72 100 DATA 169,84,72,169 100 DATA 4,32,182,187,169 110 DATA 255,76,4,187 19 c -s - 1M1 ILU HflKKW I Y Alpha Systems warrants the original purchaser of this computer software product that the recording medium on which the software programs are recorded will be free from defects in materials and workmanship for ninety days from the date of purchase. Defective media returned by the purchaser during that ninety day period will be replaced without charge, provided that the returned media have not been subjected to misuse, damage, or excessive wear. Following the initial ninety day warranty period, defective media will be replaced for a replacement fee of $6.50. Defective media should be returned to: ALPHA SYSTEMS 1012 SKYLAND DRIVE MACEDONIA, OH. 44056 in protective packaging accompanied by: (1) a brief statement describing the defect; (2) a $6.50 check or money order (if beyond the ninety day warranty period); (3) your return address; (4) the problem disk. WHAT IS NOT COVERED BY THIS WARRANTY THIS WARRANTY DOES NOT APPLY TO THE SOFTWARE PROGRAMS THEMSELVES. THE PROGRAMS ARE PROVIDED "AS IS". THIS WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES, WHETHER ORAL OR WRITTEN, EXPRESS OR IMPLIED. ANY IMPLIED WARRANTIES, INCLUDING IMPUTED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE LIMITED IN DURATION TO NINETY DAYS FROM THE DATE OF PURCHASE. ALPHA SYSTEMS SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGE FOR BREACH OF ANY EXPRESS OR IMPLIED WARRANTY. The provisions of the foregoing warranty are subject to the laws of the state in which the disk is purchased. Such laws may broaden the warranty protection available to the purchaser of the disk.